/*
 * All rights Reserved, Designed By DataDriver
 * Copyright:    DataDriver.Inc
 * Company:      Zhuo Wo Infomation Technology (ShangHai) CO.LTD
 */
package com.sun.config;

import com.sun.aop.MathCalculater;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;


/**
 * 面向切面编程。
 * 就是说在程序运行的过程中，我们将指定的代码，插入到指定位置，制定方法上发挥响应的作用
 */
@Configuration
@ComponentScan("com.sun")
@EnableAspectJAutoProxy //开启切面自动代理注解
public class AopConfig {


    @Bean
    public MathCalculater mathCalculater(){
        return new MathCalculater();
    }
}
